﻿using System.Collections.Generic;
using WeiboWPSdk.Json;

namespace WeiboWPSdk.ResponseEntity {
    public class Url : EntityBase {
        /// <summary>
        /// 短链接
        /// </summary>
        [JsonProperty("url_short")]
        public string UrlShort { get; internal set; }
        /// <summary>
        /// 原始长链接
        /// </summary>
        [JsonProperty("url_long")]
        public string UrlLong { get; internal set; }
        /// <summary>
        /// 链接的类型，0：普通网页、1：视频、2：音乐、3：活动、5、投票
        /// </summary>
        [JsonProperty("type")]
        public int Type { get; internal set; }
        /// <summary>
        /// 短链的可用状态，true：可用、false：不可用。
        /// </summary>
        [JsonProperty("result")]
        public bool Result { get; internal set; }
    }

    public class UrlReferer : EntityBase {
        [JsonProperty("clicks")]
        public int Clicks { get; internal set; }
        [JsonProperty("referer")]
        public string Referer { get; internal set; }
    }

    public class UrlLocation : EntityBase {
        [JsonProperty("clicks")]
        public int Clicks { get; internal set; }
        [JsonProperty("province")]
        public string Province { get; internal set; }
        [JsonProperty("location")]
        public string Location { get; internal set; }
    }

    internal class UrlCommentCounts : EntityBase {
        /// <summary>
        /// 短链接
        /// </summary>
        [JsonProperty("url_short")]
        public string UrlShort { get; internal set; }
        /// <summary>
        /// 原始长链接
        /// </summary>
        [JsonProperty("url_long")]
        public string UrlLong { get; internal set; }
        [JsonProperty("comment_counts")]
        public int CommentCounts { get; internal set; }
    }

    internal class UrlClicks : EntityBase {
        /// <summary>
        /// 短链接
        /// </summary>
        [JsonProperty("url_short")]
        public string UrlShort { get; internal set; }
        /// <summary>
        /// 原始长链接
        /// </summary>
        [JsonProperty("url_long")]
        public string UrlLong { get; internal set; }
        /// <summary>
        /// 总点击数
        /// </summary>
        [JsonProperty("clicks")]
        public int Clicks { get; internal set; }
    }

    internal class UrlShareCounts : EntityBase {
        /// <summary>
        /// 短链接
        /// </summary>
        [JsonProperty("url_short")]
        public string UrlShort { get; internal set; }
        /// <summary>
        /// 原始长链接
        /// </summary>
        [JsonProperty("url_long")]
        public string UrlLong { get; internal set; }
        [JsonProperty("share_counts")]
        public int ShareCounts { get; internal set; }
    }
}
